package cn.iocoder.yudao.module.member.controller.app.auth.vo;


import cn.iocoder.yudao.framework.common.validation.Mobile;
import cn.iocoder.yudao.module.system.enums.logger.LoginLogTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

@Schema(description = "管理后台 - Register Request VO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AppRegisterReqVO {
    @Schema(description = "会员帐号或手机号或电子邮箱地址", example = "15601691234")
    @NotEmpty(message = "密码不能为空")
    @Mobile
    private String loginName;

    @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456")
    @NotEmpty(message = "密码不能为空")
    @Length(min = 6, max = 16, message = "密码长度为 6-16 位")
    private String password;

    @Schema(description = "邀请码", requiredMode = Schema.RequiredMode.REQUIRED, example = "7788")
    @NotEmpty(message = "邀请码不能为空")
    @Length(min = 6, max = 16, message = "密码长度为 6-16 位")
    private String invitationCode;

    @Schema(description = "验证码", requiredMode = Schema.RequiredMode.REQUIRED, example = "999999")
    @Length(min = 4, max = 6, message = "验证码长度为 4-6 位")
    @Pattern(regexp = "^[0-9]+$", message = "验证码必须都是数字")
    private String authCode;

    @Schema(description = "IP地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "211.96.137.111")
    private String ip;

    private LoginLogTypeEnum loginLogTypeEnum;

}